using System;
using System.Collections.Generic;
using System.Text;

namespace Kenly.DBFramework.Gateway
{
    /// <summary>
    /// A class contains entity changed event data.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class EntityChangedEventArgs<T>:EventArgs
    {
        private List<T> _changedEntities = new List<T>();
        private EntityChangedType _entityChangedType;

        /// <summary>
        /// Changed entities list.
        /// </summary>
        public List<T> ChangedEntities
        {
            get
            {
                return _changedEntities;
            }
        }

        /// <summary>
        /// Changed type,for example,adding,updating and deleting.
        /// </summary>
        public EntityChangedType EntityChangedType
        {
            get
            {
                return _entityChangedType;
            }
            set
            {
                _entityChangedType = value;
            }
        }

        public EntityChangedEventArgs()
        {
        }
    }
}
